export let panel_zindex = {
    "panelLayer": "panelLayer",          //场景层
    "winLayer": "winLayer",            //弹窗层
    "win_topLayer": "win_topLayer",    //再弹窗层
    "tipsLayer": "tipsLayer",           //提示层
    "guideLayer": "guideLayer",          //向导层
    "loadingLayer": "loadingLayer"         //转圈层
};

export class panel extends cc.Component {
    package_name: string;
    panel_name: string;
    panel_zindex: string = panel_zindex.winLayer;  //默认为winLayer弹窗层
    prefab_url: string[];              //1:包名,2为组件名
    server_data: any = {};             //初始数据
    zindex: string;
    _view: any;
    isPersistPackage: boolean = false;  //是否经常出现，将保留package    

    close() {
        this.node.removeFromParent();
        if (!this.isPersistPackage) {
            fgui.UIPackage.removePackage(this.package_name);  //资源清空
        }
    }
}

export default {
    panel,
    panel_zindex
}
